import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

public class bcrypt {

    public static void bcrypt(String password){
        BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder();
        String encode = bCryptPasswordEncoder.encode(password);
        boolean matches = bCryptPasswordEncoder.matches(password, "$2a$10$dz1oGjJzWaQdnLeZaO8mpusyGJVd8X1J/gJwvgIpiAXICdouV/mGW");
        System.out.println(encode);
    }

    public static void main(String[] args) {
        bcrypt("1234");
    }
}
